package org.despair2D.ui.puppet 
{
	import org.despair2D.core.INextUpdater;
	import org.despair2D.core.NextUpdaterManager;
	
	import org.despair2D.core.ns_despair;
	use namespace ns_despair;
	
	
public class ModifiableImagePuppetComp extends ImagePuppetComp implements INextUpdater
{

	public function ModifiableImagePuppetComp( proxy:IPuppet ) 
	{
		super(proxy);
	}
	
	
	/* 已加入脏列表 */
	ns_despair static const c_addedToModifyFlag:uint  =  0x10; 


	/**
	 * @inheritDoc
	 * 更改画像
	 */
	public function modify() : void
	{
	}
	
		
	ns_despair function addToModifyList() : void
	{
		if (!Boolean(m_flags & c_addedToModifyFlag))
		{
			NextUpdaterManager.addNextUpdater(this)
			m_flags |= c_addedToModifyFlag;
		}
	}

	
	override ns_despair function recycle() : void
	{
		super.recycle();
		
		if (Boolean(m_flags & c_addedToModifyFlag))
		{
			NextUpdaterManager.removeNextUpdater(this);
			m_flags &= ~0xF0;
		}
	}
	
}

}